mui.init({
//	preloadPages:[{
//		id:'invest_record_page',
//		url:'../invest_record/invest_record.html'
//	}]
});
mui.plusReady(function() {
	var self = plus.webview.currentWebview();
	var formId = self.formId;
	var sessionId =	plus.storage.getItem(KeyCfg.JSESSIONID);
	/*---- 初始化数据 ---*/
	(function initData(){
		var url = UrlConfig.minvest_buyDetail;
		var formDatas = {loanid:formId,sessionId:sessionId};
		 MuiEventMgr.ajax(url,{pars:formDatas,
		  	sfn : function(data){
		  		console.log(data);
	        		renderData(data);
		  	}
		 });
	})();
	
	/**
	 * 将数据渲染到页面 
	 * @param {Object} data
	 */
	function renderData(data){
		var success = data.success;
		if(!success) return;
		//新增用户信息
		var realName = data.realName;
		var sex = data.sex;
		var age = data.age;
		var qualifications = data.qualifications;
		var census = data.census;
		var workcity = data.workcity;
		var house = data.house;
		var car = data.car;
		var income = data.income;
		var workYear = data.workYear;
		var marry = data.marry;
		var behoof = data.behoof;
		//用户信息页面传值
		$("#base_realName").text(realName);
		$("#base_sex").text(sex);
		$("#base_age").text(age);
		$("#base_qualifications").text(qualifications);
		$("#base_census").text(census);
		$("#base_workcity").text(workcity);
		$("#base_house").text(house);
		$("#base_car").text(car);
		$("#base_income").text(income);
		$("#base_workYear").text(workYear);
		$("#base_marry").text(marry);
		$("#base_behoof").text(behoof);
	}
	
});
